﻿CREATE TABLE [dbo].[Examen] (
    [IdExamen]           INT          IDENTITY (1, 1) NOT NULL,
    [IdCalendarizacion]  INT          NOT NULL,
    [IdCuestionario]     INT          NOT NULL,
    [IdEstudiante]       INT          NOT NULL,
    [Fecha]              DATETIME     NOT NULL,
    [Tiempo]             INT          NOT NULL,
    [TiempoTranscurrido] INT          NOT NULL,
    [Nota]               DECIMAL (18) NOT NULL,
    [NumeroIntentos]     INT          NOT NULL,
    [Estado]             VARCHAR (20) NOT NULL,
    CONSTRAINT [PK_Examen] PRIMARY KEY CLUSTERED ([IdExamen] ASC),
    CONSTRAINT [FK_Examen] FOREIGN KEY ([IdCalendarizacion], [IdCuestionario]) REFERENCES [dbo].[Calendarizacion] ([IdCalendarizacion], [IdCuestionario])
);

